home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / cm12-1.zip / TESTWIN.BAT < prev    next >
DOS Batch File  |  1993-01-25  |  1KB  |  32 lines

  1. REM  This file is an example of how to selectively run disk compressions,
  2. REM  backups, and other DOS programs that shouldn't be run when Windows
  3. REM  is running.  If you want to run this, change it appropriately to 
  4. REM  reflect the DOS apps you want to schedule.  Consult your DOS app's 
  5. REM  manual for instructions on how to run your programs from batch files.  
  6. REM    - Enjoy!
  7.  
  8. @echo off
  9.  
  10. :StartWin
  11. c:
  12. cd\
  13. cd win31              REM Run Windows
  14. win /3
  15.  
  16. if errorlevel == 99 if not errorlevel 100 goto compr
  17. if errorlevel == 98 if not errorlevel 99 goto backup
  18. Echo:  Standard Exit Windows Procedure - no return codes processed.
  19. goto end              REM If you didn't get 99 or 98 end batch file.
  20.  
  21. :compr
  22. smartdrv /C           REM Flush SmartDrive
  23. comp.exe              REM This is a disk compression (defragging) program
  24. goto StartWin         REM Restart Windows
  25.  
  26. :backup
  27. smartdrv /C           REM Flush SmartDrive
  28. tapeback.exe c: /fo   REM Tape backup command line
  29. goto StartWin         REM Restart Windows
  30.  
  31. :end                  REM End of batch file.
  32.